package com.bruce.asurada.sso.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.bruce.asurada.common.Result;
import com.bruce.asurada.common.dto.UserInfoDto;
import com.bruce.asurada.common.dto.UserLoginDto;
import com.bruce.asurada.common.dto.UserQueryDTO;
import com.bruce.asurada.common.dto.UserRegisterDto;
import com.bruce.asurada.sso.config.FeignConfig;



/**
 * 用户服务
 * @author brucezee
 * @date 2025-08-12
 
 */
@FeignClient(name = "asurada-user", path = "/user", configuration = FeignConfig.class)
public interface UserService {

    /**
     * 用户注册
     */
    @PostMapping("/register")
    public Result<Void> register(@Validated @RequestBody UserRegisterDto registerDto);


    /**
     * 登录获取用户信息
     */
    @PostMapping("/login")
    public Result<UserInfoDto> login(@RequestBody UserLoginDto loginDto);

    /**
     * 获取用户信息
     */
    @PostMapping("/info")
    public Result<UserInfoDto> getUserInfo(@RequestBody UserQueryDTO queryDTO);

}
